#include "string.h"

void *memset (void *s, int c, size_t n)
{
	char *tmp = (char *)s;

	while (n--)
		*tmp++ = c;

	return s;
}

void *memcpy(void *dest, const void *src, size_t n)
{
	char *tmp = (char *)dest, *s = (char *)src;

	while (n--)
		*tmp++ = *s++;

	return dest;
}

size_t strlen(const char *s)
{
	register int i;

	for (i = 0; s[i] != '\0'; i++)
		;
	return i;
}

